using System;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
public class MouseUtil
{
	public enum GEnum1
	{
		const_0 = 1,
		const_1,
		const_2 = 4,
		const_3 = 8,
		const_4 = 16,
		const_5 = 32,
		const_6 = 64,
		const_7 = 2048,
		const_8 = 32768
	}
	public static uint uint_0 = 2u;
	[DllImport("user32.dll", SetLastError = true)]
	public static extern void keybd_event(byte byte_0, byte byte_1, uint uint_1, uint uint_2);
	public void method_0(IntPtr intptr_0, string string_0)
	{
		for (int i = 0; i < string_0.Length; i++)
		{
			Thread.Sleep(10);
			MouseUtil.SetForegroundWindow(intptr_0);
			SendKeys.SendWait(string_0.Substring(i, 1));
		}
	}
	public void method_1(IntPtr intptr_0, string string_0, int int_0, int int_1)
	{
		for (int i = 0; i < string_0.Length; i++)
		{
			Thread.Sleep(200);
			MouseUtil.SetForegroundWindow(intptr_0);
			MouseUtil.SetCursorPos(int_0, int_1);
			MouseUtil.mouse_event(32770, int_0, int_1, 0, IntPtr.Zero);
			MouseUtil.mouse_event(32772, int_0, int_1, 0, IntPtr.Zero);
			SendKeys.SendWait(string_0.Substring(i, 1));
		}
	}
	[DllImport("User32")]
	public static extern void mouse_event(int int_0, int int_1, int int_2, int int_3, IntPtr intptr_0);
	[DllImport("User32")]
	public static extern void SetCursorPos(int int_0, int int_1);
	[DllImport("user32.dll", SetLastError = true)]
	private static extern void SetForegroundWindow(IntPtr intptr_0);
	public static void smethod_0(byte byte_0)
	{
		MouseUtil.keybd_event(17, 0, 0u, 0u);
		MouseUtil.keybd_event(byte_0, 0, 0u, 0u);
		MouseUtil.keybd_event(17, 0, MouseUtil.uint_0, 0u);
		MouseUtil.keybd_event(byte_0, 0, MouseUtil.uint_0, 0u);
	}
	public static void smethod_1()
	{
		MouseUtil.smethod_0(13);
	}
	public static void smethod_10(string string_0, int int_0, IntPtr intptr_0, int int_1, int int_2)
	{
		for (int i = 0; i < string_0.Length; i++)
		{
			if (int_0 != 0)
			{
				Thread.Sleep(int_0);
			}
			MouseUtil.SetForegroundWindow(intptr_0);
			MouseUtil.SetCursorPos(int_1, int_2);
			MouseUtil.mouse_event(32770, int_1, int_2, 0, IntPtr.Zero);
			MouseUtil.mouse_event(32772, int_1, int_2, 0, IntPtr.Zero);
			MouseUtil.smethod_11(char.Parse(string_0.Substring(i, 1)));
		}
	}
	public static void smethod_11(char char_0)
	{
		byte byte_ = MouseUtil.smethod_14(char_0);
		MouseUtil.keybd_event(byte_, 0, 0u, 0u);
		MouseUtil.keybd_event(byte_, 0, MouseUtil.uint_0, 0u);
	}
	public static void smethod_12(int int_0, int int_1)
	{
		MouseUtil.SetCursorPos(int_0, int_1);
	}
	public static void smethod_13(int int_0, int int_1, int int_2)
	{
		MouseUtil.SetCursorPos(int_0, int_1);
		int num = (int_2 - int_0) / 9;
		MouseUtil.mouse_event(32770, int_0, int_1, 0, IntPtr.Zero);
		for (int i = 0; i < num + 1; i++)
		{
			MouseUtil.SetCursorPos(int_0 + i * 9, int_1);
			Thread.Sleep(20);
		}
		MouseUtil.mouse_event(32772, int_2, int_1, 0, IntPtr.Zero);
	}
	public static byte smethod_14(char char_0)
	{
		switch (char_0)
		{
		case '*':
			return 106;
		case '+':
			return 107;
		case '-':
			return 109;
		case '.':
			return 110;
		case '/':
			return 111;
		case '0':
			return 96;
		case '1':
			return 97;
		case '2':
			return 98;
		case '3':
			return 99;
		case '4':
			return 100;
		case '5':
			return 101;
		case '6':
			return 102;
		case '7':
			return 103;
		case '8':
			return 104;
		case '9':
			return 105;
		case 'a':
			return 65;
		case 'b':
			return 66;
		case 'c':
			return 67;
		case 'd':
			return 68;
		case 'e':
			return 69;
		case 'f':
			return 70;
		case 'g':
			return 71;
		case 'h':
			return 72;
		case 'i':
			return 73;
		case 'j':
			return 74;
		case 'k':
			return 75;
		case 'l':
			return 76;
		case 'm':
			return 77;
		case 'n':
			return 78;
		case 'o':
			return 79;
		case 'p':
			return 80;
		case 'q':
			return 81;
		case 'r':
			return 82;
		case 's':
			return 83;
		case 't':
			return 84;
		case 'u':
			return 85;
		case 'v':
			return 86;
		case 'w':
			return 87;
		case 'x':
			return 88;
		case 'y':
			return 89;
		case 'z':
			return 90;
		}
		return 0;
	}
	public static void smethod_2()
	{
		MouseUtil.smethod_0(65);
	}
	public static void smethod_3()
	{
		MouseUtil.smethod_0(67);
	}
	public static void smethod_4()
	{
		MouseUtil.smethod_0(86);
	}
	public static void smethod_5()
	{
		MouseUtil.keybd_event(13, 0, 0u, 0u);
		MouseUtil.keybd_event(13, 0, MouseUtil.uint_0, 0u);
	}
	public static void smethod_6()
	{
		MouseUtil.keybd_event(8, 0, 0u, 0u);
		MouseUtil.keybd_event(8, 0, MouseUtil.uint_0, 0u);
	}
	public static void smethod_7()
	{
		MouseUtil.keybd_event(27, 0, 0u, 0u);
		MouseUtil.keybd_event(27, 0, MouseUtil.uint_0, 0u);
	}
	public static void smethod_8(string string_0, int int_0)
	{
		for (int i = 0; i < string_0.Length; i++)
		{
			if (int_0 != 0)
			{
				Thread.Sleep(int_0);
			}
			MouseUtil.smethod_11(string_0.Substring(i, 1).ToCharArray()[0]);
		}
	}
	public static void smethod_9(IntPtr intptr_0, int int_0, int int_1)
	{
		MouseUtil.SetForegroundWindow(intptr_0);
		MouseUtil.SetCursorPos(int_0, int_1);
		MouseUtil.mouse_event(32770, int_0, int_1, 0, IntPtr.Zero);
		MouseUtil.mouse_event(32772, int_0, int_1, 0, IntPtr.Zero);
	}
}
